package com.stu.module;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobExecutionListener;
import org.springframework.stereotype.Component;

/**
 * @projectName: learn_used_code
 * @packageName: com.stu.module
 * @className: com.stu.module-> SimpleJobListener
 * @createDate: 2021-10-22 18:01
 * @author: ZhangSheng
 * @version: 1.0
 * @description:
 */
@Slf4j
@Component
public class SimpleJobListener implements JobExecutionListener {

    private static Logger logger = LoggerFactory.getLogger(SimpleJobListener.class);

    @Override
    public void beforeJob(JobExecution jobExecution) {
        logger.info("JOB执行之前");
    }

    @Override
    public void afterJob(JobExecution jobExecution) {
        logger.info("JOB执行之后");
    }
}
